package com.worksystem.Controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import com.worksystem.Service.CommonService;

@Controller
@RequestMapping("common")
public class CommonController {
	
	@Autowired
	private CommonService cs;
	@RequestMapping("404")
	public ModelAndView getnotfoundpage(){
		ModelAndView mav=new ModelAndView();
		mav.setViewName("global/404");
		return mav;
	}
	
	@RequestMapping(value = "/createdata", method = { RequestMethod.POST, RequestMethod.GET },produces = "text/html;charset=UTF-8")
	@ResponseBody
	public Object createtablesData(){
		Boolean result=cs.createdata();
		return result.toString();
	}
}
